package com.mall.shopping.dto;

import com.mall.commons.result.AbstractRequest;
import com.mall.commons.tool.utils.ObjectIsEmptyUtils;
import lombok.Data;

import java.util.Objects;

/**
 *  cskaoyan
 */
@Data
public class AllProductRequest extends AbstractRequest {

    private Integer page;
    private Integer size;
    private String sort;
    private Long cid;
    private Integer priceGt;
    private Integer priceLte;

    @Override
    public void requestCheck() {
        if(ObjectIsEmptyUtils.integerIsEmpty(page)){
            setPage(1);
        }
        if (ObjectIsEmptyUtils.integerIsEmpty(size)) {
            setSize(1);
        }
    }
}
